/*
using MyGeneration/Template/NHibernate (c) by lujan99@usa.net
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace OpenGado.DATA.Entities
{
	/// <summary>
	/// Project object for NHibernate mapped table 'project'.
	/// </summary>
	[Serializable]
	public class Project
	{
		#region Member Variables
		protected int _projectid;
		protected string _name;
		protected string _code;
		protected string _coordinator;
		protected DateTime? _startingdate;
		protected DateTime? _enddate;
		protected IList<IssueItemHeader> _issueitemheader;
		protected IList<Product> _product;
		#endregion
		#region Constructors
			
		public Project() {}
					
		public Project(string name, string code, string coordinator, DateTime? startingdate, DateTime? enddate) 
		{
			this._name= name;
			this._code= code;
			this._coordinator= coordinator;
			this._startingdate= startingdate;
			this._enddate= enddate;
		}

		#endregion
		#region Public Properties
		public int Projectid
		{
			get { return _projectid; }
			set {_projectid= value; }
		}
		public string Name
		{
			get { return _name; }
			set {_name= value; }
		}
		public string Code
		{
			get { return _code; }
			set {_code= value; }
		}
		public string Coordinator
		{
			get { return _coordinator; }
			set {_coordinator= value; }
		}
		public DateTime? StartingDate
		{
			get { return _startingdate; }
			set {_startingdate= value; }
		}
		public DateTime? EndDate
		{
			get { return _enddate; }
			set {_enddate= value; }
		}
		public IList<IssueItemHeader> IssueItemHeader
		{
			get { return _issueitemheader; }
			set {_issueitemheader= value; }
		}
		public IList<Product> Product
		{
			get { return _product; }
			set {_product= value; }
		}
		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			Project castObj = (Project)obj;
			return ( castObj != null ) &&
			this._projectid == castObj.Projectid;
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * _projectid.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
